package collections;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;

public class random {
			
		  public static void main(String[] args){
			 // ArrayList<String> list1=new ArrayList<String>();
		     //   ArrayList<String> list2=new ArrayList<String>();
		
		    Random gen = new Random();
			  long start=System.currentTimeMillis();
			     System.out.println("\n"+start);
		
		     String key [] = new String[10000];
		     key [0] = new String("name 1");
		     key [1] = new String("name 2");
		     key [2] = new String("name 3");
		     key [3] = new String("name 4");
		     ArrayList<String> list1=new ArrayList<String>(Arrays.asList(key));
		     System.out.println("\nList of list1: "+list1);
		     
		     key [7] = new String("name 7");
		     list1=new ArrayList<String>(Arrays.asList(key));
		     System.out.println("\nList of list1 affter adding: "+list1);
		     
		     
		      
		     long end=System.currentTimeMillis();
		     System.out.println(end);
		     
		     System.out.println("\n"+(end-start));
		    
		
		     

		  }	
}
	
	


